import request from '@/utils/request'

// 查询采购合同列表
export function listPurchaseContract(query) {
  return request({
    url: '/myplan/purchaseContract/list',
    method: 'get',
    params: query
  })
}

// 查询采购合同详细
export function getPurchaseContract(id) {
  return request({
    url: '/myplan/purchaseContract/' + id,
    method: 'get'
  })
}

// 新增采购合同
export function addPurchaseContract(data) {
  return request({
    url: '/myplan/purchaseContract',
    method: 'post',
    data: data
  })
}

// 修改采购合同
export function updatePurchaseContract(data) {
  return request({
    url: '/myplan/purchaseContract',
    method: 'put',
    data: data
  })
}

// 删除采购合同
export function delPurchaseContract(id) {
  return request({
    url: '/myplan/purchaseContract/' + id,
    method: 'delete'
  })
}

// 导出采购合同
export function exportPurchaseContract(query) {
  return request({
    url: '/myplan/purchaseContract/export',
    method: 'get',
    params: query
  })
}